﻿using EM.OA.BLL;
using EM.OA.DataModel.DBModel;
using EM.OA.WebCommon.Base;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Reflection;
using System.Web;
namespace EM.OA.Portal.Models
{
    public class TaskModels : BaseViewModel
    {
        /// <summary>
        /// 任务ID
        /// </summary>		
        [Display(Name = "任务ID")]
        public Guid? TaskID { get; set; }
        /// <summary>
        /// 标题
        /// </summary>		
        [Display(Name = "标题")]
        public string Title { get; set; }
        /// <summary>
        /// 是否尽快完成
        /// </summary>		
        [Required(AllowEmptyStrings = true)]
        [Display(Name = "是否尽快完成")]
        public bool IsASAP { get; set; }
        /// <summary>
        /// 开始时间
        /// </summary>		
        [Display(Name = "开始时间")]
        public DateTime? StartTime { get; set; }
        /// <summary>
        /// 完成时间
        /// </summary>		
        [Display(Name = "完成时间")]
        public DateTime? FinishTime { get; set; }
        /// <summary>
        /// 紧急程度
        /// </summary>		
        [Display(Name = "紧急程度")]
        public string Priority { get; set; }
        /// <summary>
        /// 任务描述
        /// </summary>		
        [Display(Name = "任务描述")]
        public string Description { get; set; }
        /// <summary>
        /// 完成百分比
        /// </summary>		
        [Display(Name = "完成百分比")]
        public int? FinishPercent { get; set; }
        /// <summary>
        /// 状态
        /// </summary>		
        [Display(Name = "状态")]
        public byte? Status { get; set; }
        /// <summary>
        /// 负责人
        /// </summary>		
        [Display(Name = "负责人")]
        public Guid? ManageUserID { get; set; }
        public string ManageUserIDName
        {
            get
            {
                return new UserBLL().GetUserName(ManageUserID.ToString());
            }
        }
        /// <summary>
        /// 参与人(多）
        /// </summary>		
        [Display(Name = "参与人(多）")]
        public string JoinUserIDs { get; set; }
        public string JoinUserIDsName
        {
            get
            {
                return new UserBLL().GetUserName(JoinUserIDs);
            }
        }
    }
}